package com.realjinge.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.realjinge.annotation.MyBatisDao;
import com.realjinge.entity.Question;

@MyBatisDao
public interface QuestionDao {

	/**
	 * 
	 * @param user
	 * @return
	 */
	public Integer insertQuestion(Question question);

	/**
	 * 
	 * @param answer
	 * @param id
	 * @return
	 */
	public Integer updateQuestionAnswerBYID(@Param("answer") String answer, @Param("id") Integer id);

	/**
	 * 
	 * @param answer
	 * @param questionNo
	 * @return
	 */
	public Integer updateQuestionAnswerBYQuestionNo(@Param("answer") String answer,
			@Param("questionNo") String questionNo);

	/**
	 * 
	 * @param status
	 * @param id
	 * @return
	 */
	public Integer updateQuestionStatusBYID(@Param("status") String answer, @Param("id") Integer id);

	/**
	 * 
	 * @param status
	 * @param questionNo
	 * @return
	 */
	public Integer updateQuestionStatusBYQuestionNo(@Param("status") String answer,
			@Param("questionNo") String questionNo);

	/**
	 * 
	 * @param id
	 * @return
	 */
	public Question selectQuestionByID(Integer id);

	/**
	 * 
	 * @param questionNo
	 * @return
	 */
	public Question selectQuestionByQuestionNo(String questionNo);

	/**
	 * 
	 * @param typeCode
	 * @return
	 */
	public Question selectQuestionByTypeCode(String typeCode);

	/**
	 * 
	 * @return
	 */
	public List<Question> selectQuestionListByCreator(String creator);

	/**
	 * 
	 * @return
	 */
	public List<Question> selectQuestionList();

	/**
	 * 
	 * @param startNum
	 * @param endNum
	 * @return
	 */
	public List<Question> selectQuestionPage(@Param("startNum") Integer startNum, @Param("endNum") Integer endNum);

}
